Anton Khirnov [Sat, 12 Oct 2024 17:08:55 +0000 (19:08 +0200)]
fftools/ffmpeg_filter: treat apad filter as a source
Ideally lavfi should have a dedicated API for detecting this.
Fixes #11168 and #11061
(cherry picked from commit 9e2a231236428c4682c77858c6aabfd74f459b17) Signed-off-by: Anton Khirnov <anton@khirnov.net>
Gbp-Pq: Name 0014-fftools-ffmpeg_filter-treat-apad-filter-as-a-source.patch
Broken after 7753a9d62725d5bd8313e2d249acbe1c8af79ab1. Apply only the
whitelist early, and the rest with a single call to av_opt_set_dict2()
with AV_OPT_SEARCH_CHILDREN, which should be equivalent to the original
behaviour.
Reported-by: Cameron Gutman <aicommander@gmail.com>
(cherry picked from commit 9ce63e65d65b303813d4ae677228226d7cd232b9) Signed-off-by: Anton Khirnov <anton@khirnov.net>
Gbp-Pq: Name 0013-lavc-avcodec-fix-global-private-option-precendence.patch
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit de976eaf30df33e86c58c8c9af9905c1d8441934) Signed-off-by: Anton Khirnov <anton@khirnov.net>
Gbp-Pq: Name 0012-avfilter-framesync-fix-forward-EOF-pts.patch
Martin Storsjö [Thu, 3 Oct 2024 21:30:24 +0000 (00:30 +0300)]
arm: Consistently use proper interworking function returns
Use "bx lr", or "pop {lr}", which do proper mode switching
between thumb and arm modes. A plain "mov pc, lr" does not switch
from thumb mode to arm mode (while in arm mode, it does switch
mode for a thumb caller).
This is normally not an issue, as CONFIG_THUMB only is enabled if
the C compiler defaults to thumb; but stick to patterns that can
do mode switching if needed, for consistency.
James Almer [Mon, 30 Sep 2024 13:59:02 +0000 (10:59 -0300)]
avformat/mov: don't return the latest stream when an item stream is expected
Otherwise, things like ICC profiles as read from the colr box meant for an item
with no stream (like a grid) may end up being added to the wrong stream.
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Martin Storsjö <martin@martin.st>
Gbp-Pq: Name 0003-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
David Rosca [Wed, 8 May 2024 07:11:13 +0000 (09:11 +0200)]
lavc/vaapi_av1: Avoid sending the same slice buffer multiple times
When there are multiple tiles in one slice buffer, use multiple slice
params to avoid sending the same slice buffer multiple times and thus
increasing the bitstream size the driver will need to upload to hw.
Reviewed-by: Neal Gompa <ngompa13@gmail.com> Signed-off-by: David Rosca <nowrep@gmail.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
(cherry picked from commit d2d911eb9a2fc6eb8d86b3ae025a56c1a2692fba)
Gbp-Pq: Name 0002-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-m.patch
David Rosca [Wed, 8 May 2024 07:11:13 +0000 (09:11 +0200)]
lavc/vaapi_av1: Avoid sending the same slice buffer multiple times
When there are multiple tiles in one slice buffer, use multiple slice
params to avoid sending the same slice buffer multiple times and thus
increasing the bitstream size the driver will need to upload to hw.
Reviewed-by: Neal Gompa <ngompa13@gmail.com> Signed-off-by: David Rosca <nowrep@gmail.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
(cherry picked from commit d2d911eb9a2fc6eb8d86b3ae025a56c1a2692fba)
Gbp-Pq: Name 0002-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-m.patch
Dmitry Rogozhkin [Tue, 21 Nov 2023 05:57:32 +0000 (21:57 -0800)]
avcodec/decode: validate hw_frames_ctx when AVHWAccel.free_frame_priv is used
Validate that a hw_frames_ctx is available before using it for
the AVHWAccel.free_frame_priv callback, and don't require it to
be present when the callback is not in use by the HWAccel.
Dmitry Rogozhkin [Tue, 21 Nov 2023 05:57:32 +0000 (21:57 -0800)]
avcodec/decode: validate hw_frames_ctx when AVHWAccel.free_frame_priv is used
Validate that a hw_frames_ctx is available before using it for
the AVHWAccel.free_frame_priv callback, and don't require it to
be present when the callback is not in use by the HWAccel.
Dmitry Rogozhkin [Fri, 17 Nov 2023 17:03:03 +0000 (09:03 -0800)]
avcodec/decode: guard against NULL hw_frames_ctx
Guard against segfault running VLC decoding under msys2 [1]:
Thread 33 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 37728.0xadd0]
ff_hwaccel_frame_priv_alloc (avctx=0x6447b00, hwaccel_picture_private=0x65dfd00)
at libavcodec/decode.c:1848
1848 frames_ctx = (AVHWFramesContext *)avctx->hw_frames_ctx->data;
(gdb) bt
at libavcodec/decode.c:1848
at libavcodec/h264_slice.c:208
first_slice=1) at libavcodec/h264_slice.c:1599
at libavcodec/h264_slice.c:2130
at libavcodec/h264dec.c:652
got_frame=0x646e4b0, avpkt=0x64522c0) at libavcodec/h264dec.c:1048
(gdb) p avctx
$1 = (AVCodecContext *) 0x6447b00
(gdb) p avctx->hw_frames_ctx
$2 = (AVBufferRef *) 0x0
v2: check for free_frame_priv (Hendrik)
v3: return EINVAL (Christoph Reiter)
Niklas Haas [Mon, 13 Mar 2023 13:33:16 +0000 (14:33 +0100)]
avfilter/vf_libplacebo: remove deprecated field
This has not been functional since a year ago, including in our current
minimum dependency of libplacebo (v4.192.0). It also causes build errors
against libplacebo v6, so it needs to be removed from the code. We can
keep the option around for now, but it should also be removed soon.
Signed-off-by: Niklas Haas <git@haasn.dev> Signed-off-by: James Almer <jamrial@gmail.com>
Gbp-Pq: Name 0004-avfilter-vf_libplacebo-remove-deprecated-field.patch
Niklas Haas [Mon, 13 Mar 2023 13:33:16 +0000 (14:33 +0100)]
avfilter/vf_libplacebo: remove deprecated field
This has not been functional since a year ago, including in our current
minimum dependency of libplacebo (v4.192.0). It also causes build errors
against libplacebo v6, so it needs to be removed from the code. We can
keep the option around for now, but it should also be removed soon.
Signed-off-by: Niklas Haas <git@haasn.dev> Signed-off-by: James Almer <jamrial@gmail.com>
Gbp-Pq: Name 0004-avfilter-vf_libplacebo-remove-deprecated-field.patch
Niklas Haas [Mon, 13 Mar 2023 13:33:16 +0000 (14:33 +0100)]
avfilter/vf_libplacebo: remove deprecated field
This has not been functional since a year ago, including in our current
minimum dependency of libplacebo (v4.192.0). It also causes build errors
against libplacebo v6, so it needs to be removed from the code. We can
keep the option around for now, but it should also be removed soon.
Signed-off-by: Niklas Haas <git@haasn.dev> Signed-off-by: James Almer <jamrial@gmail.com>
Gbp-Pq: Name 0004-avfilter-vf_libplacebo-remove-deprecated-field.patch
Lynne [Sun, 25 Dec 2022 00:03:30 +0000 (01:03 +0100)]
hwcontext_vulkan: remove optional encode/decode extensions from the list
They're not currently used, so they don't need to be there.
Vulkan stabilized the decode extensions less than a week ago, and their
name prefixes were changed from EXT to KHR. It's a bit too soon to be
depending on it, so rather than bumping, just remove these for now.
Martin Storsjö [Mon, 5 Sep 2022 12:17:56 +0000 (15:17 +0300)]
slicethread: Limit the automatic number of threads to 16
This matches a similar cap on the number of automatic threads
in libavcodec/pthread_slice.c.
On systems with lots of cores, this fixes a couple fate failures
in 32 bit mode on such machines (where spawning a huge number of
threads runs out of address space).
Signed-off-by: Martin Storsjö <martin@martin.st>
Gbp-Pq: Name 0002-slicethread-Limit-the-automatic-number-of-threads-to.patch
When compiling FFmpeg with GCC-9, some very random segfaults were
observed in code which had previously called down into the SBC encoder
NEON assembly routines. This was caused by these functions clobbering
some of the vfp callee saved registers (d8 - d15 aka q4 - q7). GCC was
using these registers to save local variables, but after these
functions returned, they would contain garbage.
Fix by reallocating the registers in the two affected functions in
the following way:
ff_sbc_analyze_4_neon: q2-q5 => q8-q11, then q1-q4 => q8-q11
ff_sbc_analyze_8_neon: q2-q9 => q8-q15
The reason for using these replacements is to keep closely related
sets of registers consecutively numbered which hopefully makes the
code more easy to follow. Since this commit only reallocates
registers, it should have no performance impact.
Signed-off-by: James Cowgill <jcowgill@debian.org>
Gbp-Pq: Name 0001-avcodec-arm-sbcenc-avoid-callee-preserved-vfp-regist.patch
* debian/rules: Disable filter-overlay_yuv420p10 on all BE architectures
(Closes: #1019133)
* debian/: Enable librav1e support
* debian/patches: Apply upstream patch to limit automatic number of threads
to 16
When compiling FFmpeg with GCC-9, some very random segfaults were
observed in code which had previously called down into the SBC encoder
NEON assembly routines. This was caused by these functions clobbering
some of the vfp callee saved registers (d8 - d15 aka q4 - q7). GCC was
using these registers to save local variables, but after these
functions returned, they would contain garbage.
Fix by reallocating the registers in the two affected functions in
the following way:
ff_sbc_analyze_4_neon: q2-q5 => q8-q11, then q1-q4 => q8-q11
ff_sbc_analyze_8_neon: q2-q9 => q8-q15
The reason for using these replacements is to keep closely related
sets of registers consecutively numbered which hopefully makes the
code more easy to follow. Since this commit only reallocates
registers, it should have no performance impact.
Signed-off-by: James Cowgill <jcowgill@debian.org>
Gbp-Pq: Name 0001-avcodec-arm-sbcenc-avoid-callee-preserved-vfp-regist.patch
fate/lavf-image: Disable file checksums for exr tests
The generated files are endian-dependent, so no checksums
may be part of the ref files.
Fixes ticket #9854.
Tested-by: Sebastian Ramacher <sramacher@debian.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit fe211aebbf2988f7a6588cf9f45277ca74b92763)
Gbp-Pq: Name 0006-fate-lavf-image-Disable-file-checksums-for-exr-tests.patch
tests/fate-run: Allow to skip file checksums for lavf_image
The output file (even the filesize) of the recently added
EXR tests depends on the endianness; therefore checksums
of these files must not be part of the ref file. Therefore
this commit adds an option (unused for now) to disable these
checksums on a per-test basis.
In order to avoid having to check twice, the checksum and
the filesize info are moved to immediately follow one another;
this results into updates to the ref files of all lavf-image tests.